home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Educational / PrimeSpiral / Source / PrimeGenerator.h < prev    next >
Encoding:
Text File  |  1995-06-12  |  625 b   |  32 lines

  1. /* File:    PrimeGenerator.h - Prime generator for 'PrimeSpiral'
  2.  *
  3.  * By:        Christopher Lane
  4.  *        Symbolic Systems Resources Group
  5.  *        Knowledge Systems Laboratory
  6.  *        Stanford University
  7.  *
  8.  * Date:    23 February 1990
  9.  *
  10.  * Copyright:    1990 by The Leland Stanford Junior University.  This program
  11.  *        may be distributed without restriction for non-commercial use.
  12.  */
  13.  
  14. #import <objc/Object.h>
  15.  
  16. #define NUMELEMS ((size_t) 8192)
  17.  
  18. typedef struct { unsigned int prime, square; } ENTRY;
  19.  
  20. @interface PrimeGenerator:Object
  21. {
  22.     unsigned int number, index;
  23.     size_t maximum;
  24.     ENTRY *primes;
  25. }
  26.  
  27. + new;
  28. - (unsigned int) generate;
  29. - free;
  30.  
  31. @end
  32.